﻿using IBLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model;

namespace ZY7.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class MemberLevelController : ControllerBase
    {
        public MemberLevelController(IMemberLevelBLL bll)
        {
            Bll = bll;
        }

        public IMemberLevelBLL Bll { get; }
        [HttpPost]
        public Task<int> AddMemberLevel(MemberLevelModel level)
        {
            return Bll.AddMemberLevel(level);
        }
        [HttpGet]
        public List<MemberLevelModel> GetLevelMembers()
        {
            return Bll.GetLevelMembers();
        }
    }
}
